/** @jsxImportSource @emotion/react */
import * as React from "react";
import {CCell, Cell, Table, TableBody, TableRow, Text,} from "customize-easy-ui-component";
import {DirectLink} from "../../routing/Link";
import Img_Seal from "../../images/seal.png";

//[可定制]的， 部分格子稍微有差别的。label3；
export const 检验设备结论Observ= ({theme, orc, rep,label3='审批',fixed=["8.1%","48%","4%","13.5%","%"]} :{theme: any, orc:any, rep:any,label3?:any,fixed?:string[]}
) => {
  return <>
    <Table fixed={ fixed }  css={ {borderCollapse: 'collapse' } } tight miniw={800}>
      <TableBody>
        <DirectLink  href={`/report/${rep?.modeltype}/ver/${rep?.modelversion}/${rep?.id}/Conclusion`}>
          <TableRow>
            <CCell>检验日期</CCell>
            <CCell colSpan={2}>{orc.检验日期}</CCell>
            <CCell>下次检验日期</CCell>
            <CCell>{orc.新下检日 || '／'}</CCell>
          </TableRow>
          <TableRow>
            <CCell>检验人员</CCell>
            <Cell colSpan={4}>{orc.检验人员}</Cell>
          </TableRow>
          <TableRow>
            <CCell>编制</CCell>
            <CCell>{orc.检验人IDs}</CCell>
            <CCell><Text css={{fontSize:'0.75rem'}}>日期</Text></CCell>
            <CCell>{orc.检验日期 || '／'}</CCell>
            <CCell rowSpan={3}>
              <div css={{
                height:'8rem',
                '::before': {
                  filter: 'opacity(30%)',
                  width: '100%',
                  height: '100%',
                  backgroundImage: `url(${Img_Seal})`,
                  content: '" "',
                  position: 'absolute',
                  top: 0,
                  left: 0,
                  backgroundRepeat: 'no-repeat',
                  backgroundPosition: 'center',
                }
              }}>
                <Table  fixed={ ["40%","%"]  }
                        css={ {borderCollapse: 'collapse',height:'fill-available'} }  tight miniw={800}
                >
                  <TableBody>
                    <TableRow>
                      <CCell css={{border:'none'}}>机构核准证号：</CCell>
                      <CCell css={{border:'none'}}>{rep?.isp?.ispu?.agency?.apno}</CCell>
                    </TableRow>
                    <TableRow>
                      <CCell css={{border:'none'}} colSpan={2}>（检验机构公章或者检验专用章）</CCell>
                    </TableRow>
                    <TableRow>
                      <CCell css={{border:'none'}}>日期：</CCell>
                      <Cell css={{border:'none'}}>2024/03/04</Cell>
                    </TableRow>
                  </TableBody>
                </Table>
              </div>
            </CCell>
          </TableRow>
        </DirectLink>
        <TableRow>
          <CCell>审核</CCell>
          <CCell></CCell>
          <CCell><Text css={{fontSize:'0.75rem'}}>日期</Text></CCell>
          <CCell></CCell>
        </TableRow>
        <TableRow >
          <CCell>{label3}</CCell>
          <CCell></CCell>
          <CCell><Text css={{fontSize:'0.75rem'}}>日期</Text></CCell>
          <CCell>2024-04-06</CCell>
        </TableRow>
      </TableBody>
    </Table>
    </>;
};
